\begin{normalsize}
	\begin{itemize}



		\item \textbf{lookForObstacle}:
		\begin{itemize}
			\item Inputs: 

			\begin{itemize}
				\item ros::Publisher velocity\_pub: the publisher object to control the wheels speed;
				\item ros::Publisher head\_angle\_pub: the publisher object to control the ultrasonic sensor;
				\item ros::Rate r: the desired spin rate to run at in Hz;
				\item double obj\_angle: the angle that the robot has to reach if it does not see any obstacle (0 is the starting robot angle).
			\end{itemize}

			\item Outputs:

			\begin{itemize}
				\item bool found: true if the robot has found an obstacle.
			\end{itemize}

			\item Description: at first the robot looks for the obstacles by rotating only the ultrasonic sensor instead of the whole body so that motion errors can be prevented. If the ultrasonic sensor detects the obstacle the robot rotates aligning itself with it and the function returns true, otherwise it returns false.

		\end{itemize}



\item \textbf{stop}:
\begin{itemize}
	\item Inputs: 

	\begin{itemize}
		\item ros::Publisher velocity\_pub: the publisher object which allows messages publications;
		\item ros::Rate r:  the desired rate to run at in Hz.
	\end{itemize}

	\item Description: it makes the robot stop. % terza persona, ho aggiuno una s a make, ci va? non sono molto bravo in inglese ;)
\end{itemize}



\item \textbf{callbackGyro}:
		\begin{itemize}

			\item Inputs: 

			\begin{itemize}
				\item const nxt\_msgs::Gyro::ConstPtr\& msg: the incoming message.
			\end{itemize}

			\item Description: it periodically receives the angular speed from the gyroscope sensor and updates two global variables: \emph{gyro\_angular\_z}, which stores the received speed making it available to other functions, and \emph{gyro\_integration}, which stores the sum of the angular speeds over time, that is the measured travelled angular distance.

		\end{itemize}



\item \textbf{callbackUltrasonicSensor}:
\begin{itemize}
	\item Inputs: 
		\begin{itemize}
			\item const nxt\_msgs::Range::ConstPtr\& msg: the incoming message.
		\end{itemize}
	\item Description: it reads the distance measurements from the ultrasonic sensor and updates the global variable \emph{range}.
\end{itemize}


	\end{itemize}
\end{normalsize}